﻿using System;

namespace Sample.JwtBearer.Api.Settings;

public class JwtSettings
{
    /// <summary>
    /// jwt 签名秘钥
    /// </summary>
    public string SecurityKey { get; set; } = string.Empty;

    /// <summary>
    /// Token 颁发机构
    /// </summary>
    public string Issuer { get; set; } = string.Empty;

    /// <summary>
    /// Token 拥有者（颁发给谁）
    /// </summary>
    public string Audience { get; set; } = string.Empty;


    /// <summary>
    /// 访问 Token 过期时间
    /// </summary>
    public TimeSpan ExpiresIn { get; set; }

    /// <summary>
    /// 刷新 Token 的到期时间（通常情况时间设置大于访问 Token 的过期时间）
    /// 单位：天/Day
    /// </summary>
    public int ExpiryTimeOfDay { get; set; }
}